#ifndef SESSION_H
#define SESSION_H 1

#include "main.h"
#include "bool.h"
#include "cookie.h"


typedef struct sesssion {
  char *str_IP;
  char *sidPtr;
  bool authed;
  bool firstRequest;
} session_t;


session_t *
get_session(const char *sid);

session_t *
get_session_from_cookie(ck_map_t *cookies);

void
check_session(session_t *ses, ck_map_t *send_cookies);

void
init_sessionmgr(void);

void
free_sessionmgr(void);

#endif
